import {createRouter,createWebHistory} from  'vue-router'
import PkIndex from "../components/pk/PkIndex.vue";
import RankIndex from "../components/ranklist/RankIndex.vue";
import RecordIndex from "../components/record/RecordIndex.vue";
import UserIndex from "../components/user/bot/UserIndex.vue";
import ErrorIndex from "../components/error/ErrorIndex.vue";

const routes=[
    {
      path:'/',
      name:'pk',
      redirect: "/pk/"
    },
    {
        path:'/pk/',
        name:"pk",
        component:PkIndex,
    },
    {
        path:'/ranklist/',
        name:"ranklist",
        component: RankIndex
    },
    {
        path:"/record/",
        name:"record",
        component:RecordIndex
    },
    {
        path:"/userindex/",
        name:"userindex",
        component:UserIndex
    },
    {
        path:"/404/",
        name:"404",
        component:ErrorIndex
    },
    {
        path:'/:catchAll(.*)',
        redirect: '/404/'
    }
]
const router=createRouter({
    history:createWebHistory(),
    routes
})
export default router